package com.hy.study.config;

import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 使用ConfigurationProperties 读取配置文件
 *
 * @author huyong
 * @date 2024 年 01 月 08 日 16:50: 54
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "spring.datasource")
public class JdbcConfig {

    private String url;
    private String username;
    private String password;
    private String driverClassName;
}
